﻿using System;
using System.Collections.Generic;
using System.Text;
using FlexiCommerce.Components;

namespace FlexiCommerce.Tests.Persistence.Definitions
{

	public class NonVirtualItem : GenericPersistenceItem
	{
		public bool BoolProperty
		{
			get { return (bool)(GetDetail("BoolProperty") ?? true); }
			set { SetDetail<bool>("BoolProperty", value); }
		}

		public int IntProperty
		{
			get { return (int)(GetDetail("IntProperty") ?? 0); }
			set { SetDetail<int>("IntProperty", value); }
		}

		public DateTime DateTimeProperty
		{
			get { return (DateTime)(GetDetail("DateTimeProperty") ?? DateTime.MinValue); }
			set { SetDetail<DateTime>("DateTimeProperty", value); }
		}
		public double DoubleProperty
		{
			get { return (double)(GetDetail("DoubleProperty") ?? 0); }
			set { SetDetail<double>("DoubleProperty", value); }
		}
		public string StringProperty
		{
			get { return (string)(GetDetail("StringProperty") ?? string.Empty); }
			set { SetDetail<string>("StringProperty", value); }
		}
        public GenericPersistenceItem LinkProperty
		{
            get { return (GenericPersistenceItem)GetDetail("LinkProperty"); }
            set { SetDetail<GenericPersistenceItem>("LinkProperty", value); }
		}
		public object ObjectProperty
		{
			get { return (object)GetDetail("ObjectProperty"); }
			set { SetDetail<object>("ObjectProperty", value); }
		}
	}
}
